﻿#region

using PTCN.CrossPlatform.BettingGame.DataAccess.Types;

#endregion

namespace PTCN.CrossPlatform.BettingGame.Bingo.Models
{
    public class SediePlayer : BettingGamePlayer
    {
        public SediePlayer(AccountDb account)
            : base(account)
        {
            Status = PlayerStatus.NOT_INGAME;
            Role = SediePlayerRole.NONE;
            IsBanker = false;
            State = new SedieState(AccountID);
            Result = new SedieResult(AccountID, Account.UserName);
        }

        public SediePlayerRole Role { get; private set; }
        public bool IsBanker { get; internal set; }
        public SedieState State { get; private set; }
        public SedieResult Result { get; private set; }

        #region Bi Ngo property
        //add here
        #endregion

        public override void ClearData()
        {
            base.ClearData();
            IsBanker = false;
            Status = PlayerStatus.VIEWER;
            Role = SediePlayerRole.NORMAL;
            State.Refresh();
            Result.Refresh();
        }

        internal void RefreshData()
        {
            Status = PlayerStatus.VIEWER;
            State.Refresh();
            Result.Refresh();
        }
    }
}